package cmdclasses.bandit;

import java.util.Vector;

import bot.CommandBot;

public class BanditRunnable extends BanditRunnableImpl {
	private Vector<String> receivers;
	private String currentPlayed;
	private CommandBot bot;

	@Override
	public void run() {
		String temp = CurrentPlayed.currentSong();
		if(!currentPlayed.equals(temp) ) {
			currentPlayed = temp;
			for(String target: receivers) {
				bot.sendMessage(target, currentPlayed);
			}
		}
	}

	@Override
	public void setUp(CommandBot bot, Vector<String> receivers) {
		this.receivers = receivers;
		this.bot = bot;
		this.currentPlayed = CurrentPlayed.currentSong();
	}

}
